package com.ly.heart.domain;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ly.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 金蝶-检验单分录信息（物料信息）对象 erp_king_check_material_info
 *
 * @author cxl
 * @date 2024-08-11
 */
@TableName ("erp_king_check_material_info")
@ApiModel (value = "金蝶-检验单分录信息（物料信息）", description = "金蝶-检验单分录信息（物料信息）")
@Data
@Accessors(chain = true)
public class KingCheckMaterialEntity{

    /** 主键id */
    @TableId (type = IdType.INPUT)
    private String id;

    /** 源单类型(收料通知单0；检验单1) */
    @ApiModelProperty ("源单类型(收料通知单0；检验单1)")
    @TableField ("source_type")
    @Excel (name = "源单类型(收料通知单0；检验单1)")
    private String sourceType;

    /**关联id(收料通知单id/检验单id)*/
    @ApiModelProperty ("关联id(收料通知单id/检验单id)")
    @TableField ("relation_id")
    @Excel (name = "关联id(收料通知单id/检验单id)")
    private String relationId;

    /**关联订单code(收料通知单code/检验单code)*/
    @ApiModelProperty ("关联订单code(收料通知单code/检验单code)")
    @TableField ("relation_code")
    @Excel (name = "关联订单code(收料通知单code/检验单code)")
    private String relationCode;

    /** 检验单id */
    @ApiModelProperty ("检验单id")
    @TableField ("check_id")
    @Excel (name = "检验单id")
    private String checkId;

    /** 源单物料明细id */
    @ApiModelProperty ("源单物料明细id")
    @TableField ("source_material_detail_id")
    @Excel (name = "源单物料明细id")
    private String sourceMaterialDetailId;

    /** 物料id */
    @ApiModelProperty ("物料id")
    @TableField ("material_id")
    @Excel (name = "物料id")
    private String materialId;

    /** 物料编码 */
    @ApiModelProperty ("物料编码")
    @TableField ("material_code")
    @Excel (name = "物料编码")
    private String materialCode;

    /** 物料名称 */
    @ApiModelProperty ("物料名称")
    @TableField ("material_name")
    @Excel (name = "物料名称")
    private String materialName;

    /** 规格型号 */
    @ApiModelProperty ("规格型号")
    @TableField ("material_model")
    @Excel (name = "规格型号")
    private String materialModel;

    /** 质检方案 */
    @ApiModelProperty ("质检方案")
    @TableField ("quality_plan")
    @Excel (name = "质检方案")
    private String qualityPlan;

    /** 单位 */
    @ApiModelProperty ("单位")
    @TableField ("unit")
    @Excel (name = "单位")
    private String unit;

    /** 检验数量 */
    @ApiModelProperty ("检验数量")
    @TableField ("check_num")
    @Excel (name = "检验数量")
    private String checkNum;

    /** 合格数量 */
    @ApiModelProperty ("合格数量")
    @TableField ("qualified_num")
    @Excel (name = "合格数量")
    private String qualifiedNum;

    /** 不合格数量 */
    @ApiModelProperty ("不合格数量")
    @TableField ("unqualified_num")
    @Excel (name = "不合格数量")
    private String unqualifiedNum;

    /** 检验结果 */
    @ApiModelProperty ("检验结果")
    @TableField ("check_result")
    @Excel (name = "检验结果")
    private String checkResult;

    /** 质检状态 */
    @ApiModelProperty ("质检状态")
    @TableField ("check_status")
    @Excel (name = "质检状态")
    private String checkStatus;

    /** 供应商id */
    @ApiModelProperty ("供应商id")
    @TableField ("supplier_id")
    @Excel (name = "供应商id")
    private String supplierId;

    /** 供应商code */
    @ApiModelProperty ("供应商code")
    @TableField ("supplier_code")
    @Excel (name = "供应商code")
    private String supplierCode;

    /** 仓库id */
    @ApiModelProperty ("仓库id")
    @TableField ("warehouse_id")
    @Excel (name = "仓库id")
    private String warehouseId;

    /** 仓库编码 */
    @ApiModelProperty ("仓库编码")
    @TableField ("warehouse_code")
    @Excel (name = "仓库编码")
    private String warehouseCode;

    /** 仓位 */
    @ApiModelProperty ("仓位")
    @TableField ("warehouse_position")
    @Excel (name = "仓位")
    private String warehousePosition;

    /** 批号 */
    @ApiModelProperty ("批号")
    @TableField ("batch_num")
    @Excel (name = "批号")
    private String batchNum;

    /** 行号 */
    @ApiModelProperty ("行号")
    @TableField ("line_number")
    @Excel (name = "行号")
    private String lineNumber;

    /** 折让金额 */
    @ApiModelProperty ("折让金额")
    @TableField ("discount_amount")
    @Excel (name = "折让金额")
    private String discountAmount;

    /** 录入人 */
    @ApiModelProperty ("录入人")
    @TableField ("user_id")
    @Excel (name = "录入人")
    private String userId;

    /** 创建时间 */
    @ApiModelProperty ("创建时间")
    @TableField ("create_time")
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createTime;

    /** 更新时间 */
    @ApiModelProperty ("更新时间")
    @TableField ("change_time")
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date changeTime;

    /** 逻辑删除 */
    @ApiModelProperty ("逻辑删除")
    @TableField ("is_used")
    @Excel (name = "逻辑删除")
    @TableLogic
    private Integer isUsed;


    @ApiModelProperty("使用决策信息")
    @TableField(exist = false)
    private List<KingCheckMaterialUseDecisionEntity> decisionList;

    @ApiModelProperty("物料明细分录信息")
    @TableField(exist = false)
    private KingCheckMaterialDetailEntity materialDetail;

    @ApiModelProperty("单位名称")
    @TableField(exist = false)
    private String unitName;

    @ApiModelProperty("供应商名称")
    @TableField(exist = false)
    private String supplierName;

    @ApiModelProperty("仓库名称")
    @TableField(exist = false)
    private String warehouseName;



}
